<template>
    <van-tabbar route>
        <van-tabbar-item v-for="item of items" :key="item.name" :icon="item.icon" :to="item.path">
            {{item.name}}
        </van-tabbar-item>
    </van-tabbar>
</template>

<script setup>
  const items = [{
    name: '首页',
    path: '/',
    icon: 'home-o',
  }, {
    name: '分类',
    path: '/category',
    icon: 'apps-o',
  }, {
    name: '推荐',
    path: '/recommend',
    icon: 'gift-o',
  }, {
    name: '购物车',
    path: '/cart',
    icon: 'cart-o',
  }, {
    name: '我的',
    path: '/user',
    icon: 'user-o',
  }]
</script>
